﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Entity.Infrastructure;
using System.Data.Entity;
using IMC.Prepare.Data.Initializers;

namespace IMC.Prepare.Data
{
    public class SqlServerDataProvider : BaseEfDataProvider
    {
        public override IDbConnectionFactory GetConnectionFactory()
        {
            return new SqlConnectionFactory();
        }

        public override void SetDatabaseInitializer()
        {
            var initializer = new CreateTablesIfNotExist<NopObjectContext>();
            Database.SetInitializer<NopObjectContext>(initializer);
        }

        public override bool StoredProceduredSupported
        {
            get { return true; }
        }
    }
}
